//
//  NSObject+HDProvinceModel.m
//  app
//
//  Created by D on 15/5/11.
//  Copyright (c) 2015年 hdaren. All rights reserved.
//

#import "HDProvinceModel.h"
#import "HDCityModel.h"
#import "HDCityCell.h"

@implementation  HDProvinceModel

-(instancetype)initWithDict:(NSDictionary *)dict
{
    self = [super init];
    if (self) {
    _titles = @[@"热门城市",@"A",@"B",@"C",@"D",@"E",@"F",@"G",@"H",@"I",@"J",@"K",@"L",@"M",@"N",@"O",@"P",@"Q",@"R",@"S",@"T",@"U",@"V",@"W",@"X",@"Y",@"Z"];

        NSMutableArray * array = [[NSMutableArray alloc] init];
        for (NSDictionary * dic in dict)
        {
            HDCityModel * model = [[HDCityModel alloc] initWithDict:dic];
            [array addObject:model];

        }
        
        _subColumnArray = array;
        NSLog(@"%d",array.count);
//        _cellHeight = [HDCityCell heightOfCellWithSubBtnCount:array.count];
        _isOpen = NO;
    }
    return self;
}

+(instancetype)modelWithDict:(NSDictionary *)dict
{
    return [[self alloc] initWithDict:dict];
}

@end
